package com.book.book.service.impl;

import com.book.book.domain.UsersDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.book.book.dao.UsersDao;
import com.book.book.service.UsersService;



@SuppressWarnings("SpringJavaAutowiringInspection")
@Service
public class UsersServiceImpl implements UsersService {
	@Autowired
	private UsersDao usersDao;
	
	@Override
	public UsersDO get(String id){
		return usersDao.get(id);
	}
	
	@Override
	public List<UsersDO> list(Map<String, Object> map){
		return usersDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return usersDao.count(map);
	}
	
	@Override
	public int save(UsersDO user){
		return usersDao.save(user);
	}
	
	@Override
	public int update(UsersDO user){
		return usersDao.update(user);
	}
	
	@Override
	public int remove(Integer id){
		return usersDao.remove(id);
	}

	@Override
	public int batchRemove(Integer[] ids){
		return usersDao.batchRemove(ids);
	}

	@Override
	public List<UsersDO> listWithName(Map<String, Object> map) {
		return usersDao.listWithName(map);
	}

	/***
	 * 根据open id 查询用户
	 * @return

	 * @param openid
	 */
	@Override
	public UsersDO getopenid(String openid) {
		return usersDao.getOperId(openid);
	}
}
